package robot;


import java.awt.Color;

import renderables.RenderablePoint;
import renderables.RenderablePolygon;
//import renderables.RenderableString;

public class Obstacle {

	public RenderablePoint vertex [];
	public RenderablePolygon rendPolygon;
	
	public Obstacle (int x1, int y1, int x2, int y2, 
			         int x3, int y3, int x4, int y4) {
		
		vertex = new RenderablePoint[4];

		vertex[0] = new RenderablePoint(x1, y1);
		vertex[1] = new RenderablePoint(x2, y2);
		vertex[2] = new RenderablePoint(x3, y3);
		vertex[3] = new RenderablePoint(x4, y4);
	}
	
	public RenderablePolygon print() {
		rendPolygon = new RenderablePolygon();
		
		rendPolygon.addVertex(vertex[0]);
		//gui.draw(new RenderableString ((int) (vertex[0].x), (int) (vertex[0].y), 
		//"(" + ((int) (vertex[0].x)) + "," + (int) (vertex[0].y) + ")" ));
		
		rendPolygon.addVertex(vertex[1]);
		//RenderableString stringForPath1 = new RenderableString ((int) (vertex[1].x), (int) (vertex[1].y), 
		//		"(" + ((int) (vertex[1].x)) + "," + (int) (vertex[1].y) + ")" );
//		gui.draw(stringForPath1);
		
		rendPolygon.addVertex(vertex[2]);
		//RenderableString stringForPath2 = new RenderableString ((int) (vertex[2].x), (int) (vertex[2].y), 
		//		"(" + ((int) (vertex[2].x)) + "," + (int) (vertex[2].y) + ")" );
//		gui.draw(stringForPath2);
		
		rendPolygon.addVertex(vertex[3]);
		//RenderableString stringForPath3 = new RenderableString ((int) (vertex[3].x), (int) (vertex[3].y), 
		//		"(" + ((int) (vertex[3].x)) + "," + (int) (vertex[3].y) + ")" );
//		gui.draw(stringForPath3);
		
		rendPolygon.setProperties(Color.GREEN, false);
		return rendPolygon;
	}
}